import request from '@/utils/request'

export function queyrFavouriteList() {
  return request({
    url: '/plm-sys/objectFavorites/queryPageList',
    method: 'POST',
    data: {
      t: {
        code: '',
        id: '',
        name: '',
        url: '',
        workspaceId: '',
        workspaceName: ''
      }
    }
  })
}

export function delFav(id) {
  return request({
    url: '/plm-sys/objectFavorites/del?id=' + id,
    method: 'POST'
  })
}

export function getWorkspacebyuser(type) {
  return request({
    url: '/plm-sys/api/sysWorkspace/workspacebyuser?type=' + type,
    method: 'GET'
  })
}

export function addFavData(data) {
  return request({
    url: '/plm-sys/objectFavorites/add',
    method: 'POST',
    data
  })
}

